package com.itheima.springboot02_02redis_test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import redis.clients.jedis.Jedis;

@SpringBootApplication
public class SpringBoot0202redisTestApplication {

    public static void main(String[] args) {

        //获取IOC容器
        ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringBoot0202redisTestApplication.class, args);
        //获取IOC容器中的对象
        Jedis jedis = applicationContext.getBean(Jedis.class);
        System.out.println(jedis);
    }

}
